Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 31: Creating New Node Types

../ch31/31fig04.gif
Figure 31.4

An external file containing an appearance library with wood appearances.

31fig04.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
PROTO DarkOak [
    exposedField SFNode textureTransform NULL
] {
    Appearance {
        material Material { diffuseColor 1.0 0.45 0.23 }
        texture ImageTexture { url "wood_g.jpg" }
        textureTransform IS textureTransform
    }
}
PROTO LightOak [
    exposedField SFNode textureTransform NULL
] {
    Appearance {
        material Material { diffuseColor 1.0 0.65 0.53 }
        texture ImageTexture { url "wood_g.jpg" }
        textureTransform IS textureTransform
    }
}